package com.qf.springmvc2.controller;

import com.qf.springmvc2.entity.FastUser;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@RestController
@RequestMapping("/fast")
public class FastController {

    @RequestMapping("test1")
    public FastUser test1(){
        FastUser fastUser = new FastUser();
        fastUser.setUsername("飞飞");
        fastUser.setBirthday(new Date());
        fastUser.setMarryDay(new Date());
        fastUser.setSalary(800.343D);
        fastUser.setPassword("1234");
        // 主动抛一个异常 为了验证全局的异常解析器
//        int a = 1/0;
        return fastUser;
    }
}
